<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
        	登录成功 <br><br/>
    		<a>${realname}，欢迎您！</a><br/>
    		
    		<a href="${pageContext.request.contextPath}/user/shiro/logout">退出登录</a><br/><br/>
    		
    		<a href="${pageContext.request.contextPath}/hasAdmin.do">我是管理员</a><br/><br/>
    		<a href="${pageContext.request.contextPath}/hasUser.do">我是普通用户</a><br/><br/>
    		
    		<%-- <shiro:hasRole name="admins">
			   <br/><br/>
			   <a href="${pageContext.request.contextPath}/adminPage.jsp">Admin Page</a>
			</shiro:hasRole> --%>
			   
			<%-- <shiro:hasRole name="users">
			   <br/><br/>
			   <a href="${pageContext.request.contextPath}/userPage.jsp">User Page</a>
			</shiro:hasRole> --%>

  </body>
</html>
